package edu.gatech.cs2340.mule.model;
import java.io.Serializable;

/**
 * 
 * This class will take care of any operations dealing with
 * resources and the store.
 * 
 * @author Keegan Nesbitt
 *
 */
public class StoreInterface implements Serializable {

	private static final long serialVersionUID = -697681520639340211L;
	
	private Store gameStore;
	
	/**
	 * 
	 * @param gameStore The game's store
	 */
	public StoreInterface(Store gameStore) {
		this.gameStore = gameStore;
	}
	
	/**
	 * 
	 * @return The amount of energy the store has
	 */
	public int getEnergyStock() {
		return gameStore.getEnergyStock();
	}
	
	/**
	 * 
	 * @return The amount of smithore in the store
	 */
	public int getSmithoreStock() {
		return gameStore.getSmithoreStock();
	}
	
	/**
	 * 
	 * @return The amount of food in the store
	 */
	public int getFoodStock() {
		return gameStore.getFoodStock();
	}
	
	/**
	 * 
	 * @param energyAmount The amount of energy for which to calculate the price
	 * @return The price of the specified amount of energy
	 */
	public int calculateEnergyPurchasePrice(int energyAmount) {
		return gameStore.calculateEnergyPurchasePrice(energyAmount);
	}
	
	/**
	 * 
	 * @param smithoreAmount The amount of smithore for which to calculate the price
	 * @return The price of the specified amount of smithore
	 */
	public int calculateSmithorePurchasePrice(int smithoreAmount) {
		return gameStore.calculateSmithorePurchasePrice(smithoreAmount);
	}
	
	/**
	 * 
	 * @param foodAmount The amount of food for which to calculate the price
	 * @return The price of the specified amount of food
	 */
	public int calculateFoodPurchasePrice(int foodAmount) {
		return gameStore.calculateFoodPurchasePrice(foodAmount);
	}
	
	/**
	 * 
	 * @param muleType The type of mule for which to calculate the price
	 * @return The price of the specified type of mule
	 */
	public int calculateMulePurchasePrice(String muleType) {
		return gameStore.calculateMulePurchasePrice(muleType);
	}
	
	/**
	 * 
	 * @return True if mules are in stock to purchase, false otherwise
	 */
	public boolean canPurchaseMule() {
		return gameStore.canPurchaseMule();
	}
	
	/**
	 * 
	 * @param muleType The type of mule to purchase
	 * @return The specified type of Mule purchased from the store
	 */
	public Mule purchaseMule(String muleType) {
		return gameStore.purchaseMule(muleType);
	}
	
	/**
	 * 
	 * @param foodAmount The amount of food attempting to be purchased from the store
	 * @return True if the transaction was successful, false otherwise
	 */
	public boolean purchaseFood(int foodAmount) {
		return gameStore.purchaseFood(foodAmount);
	}
	
	/**
	 * 
	 * @param energyAmount The amount of energy attempting to be purchased from the store
	 * @return True if the transaction was successful, false otherwise
	 */
	public boolean purchaseEnergy(int energyAmount) {
		return gameStore.purchaseEnergy(energyAmount);
	}
	
	/**
	 * 
	 * @param smithoreAmount The amount of smithore attempting to be purchased from the store
	 * @return True if the transaction was successful, false otherwise
	 */
	public boolean purchaseSmithore(int smithoreAmount) {
		return gameStore.purchaseSmithore(smithoreAmount);
	}
	
	/**
	 * 
	 * Returns the specified amount of food to the store's inventory
	 * 
	 * @param foodAmount
	 */
	public void tradeInFood(int foodAmount) {
		gameStore.tradeInFood(foodAmount);
	}
	
	/**
	 * 
	 * Returns the specified amount of energy to the store's inventory
	 * 
	 * @param energyAmount
	 */
	public void tradeInEnergy(int energyAmount) {
		gameStore.tradeInEnergy(energyAmount);
	}
	
	/**
	 * 
	 * Returns the specified amount of smithore to the store's inventory
	 * 
	 * @param smithoreAmount
	 */
	public void tradeInSmithore(int smithoreAmount) {
		gameStore.tradeInSmithore(smithoreAmount);
	}
}
